# while循环

# while condition:
#     do something

# while condition:
#     do something
# else:
#     do smething

# 计算1到100的和
# i = 0
# result = 0
# while i <= 100:
#     result += i
#     i += 1
# print("1到100内所有偶数之和为：", result)

# 计算1到100的和
i = 0
result = 0
while i <= 100:
    result += i
    i += 1
else:
    print("计算完成！")
    print("不满足条件后，当下i的值是：", i)
print("1到100内所有偶数之和为：", result)
